package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-07-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_admin_user")
public class GuAdminUser extends Model<GuAdminUser> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 用户头像
     */
    private String salt;

    /**
     * 0 禁用 1 启用
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime guCreate;

    /**
     * 更新时间
     */
    private LocalDateTime guModified;
    @TableField(exist = false)
    private String roleName;

    @TableField(exist = false)
    private Integer roleId;



    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
